<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <h:form>
            <p:selectOneMenu effect="drop" value="#{Cities.selectedCity}" converter="city" var="c" filter="true" filterMatchMode="startsWith">
                <f:selectItems value="#{Cities.listCities2()}" var="city" itemLabel="#{city.cityname}" itemValue="#{city}"/>
                <p:column>
                    #{c.cityname}
                </p:column>
            </p:selectOneMenu>
            <p:commandButton value="Submit" update="display" />  
             <h:panelGrid columns="1" id="display">  

                 <h:outputText value="Value 3: #{Cities.selectedCity.cityname}"  />  


                </h:panelGrid>  

        </h:form>
    </h:body>
</html>

